<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>table模块快速使用</title>
    <link rel="stylesheet" href="../layui/css/layui.css" media="all">
</head>
<body>

<table id="demo" lay-filter="test"></table>


<script src="../layui/layui.js"></script>
<script>
    layui.use('table', function(){
        var table = layui.table;

        //第一个实例
        table.render({
            elem: '#demo'
            ,height: 312
            ,url: '/user/cinfo' //数据接口
            ,page: false //开启分页
            ,cols: [[ //表头
                {field: 'classid', title: '班号', width:80, fixed: 'left'}
                ,{field: 'cname', title: '班级名', width:200}
                ,{field: 'pnum', title: '人数', width:80, }
                ,{field: 'data', title: '入学年份', width:90}
                ,{field: 'teacher', title: '班主任', width: 200}

            ]]
        });

    });
</script>
</body>
</html>